package com.onekbase.demo.mybatis.config;

import com.onekbase.demo.mybatis.intercept.ExamplePlugin;
import com.onekbase.demo.mybatis.intercept.ExamplePlugin2;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan("com.onekbase.demo.mybatis.mapper")
public class MybatisConfig {
    @Bean
    ConfigurationCustomizer mybatisConfigurationCustomizer() {
        return configuration -> {
        };
    }

    @Bean
    ExamplePlugin examplePlugin(){
        return new ExamplePlugin();
    }

    @Bean
    ExamplePlugin2 examplePlugin2(){
        return new ExamplePlugin2();
    }
}
